This invention relates generally to data communications and, in particular, to an LSI single-chip data link controller for interfacing between a microcomputer or terminal and a data communications link operating under the SDLC, HDLC, or ADCCP data communications protocols (see below for an explanation of such protocols).
The establishment of interconnecting computer networks and the increasing use of remote intelligent terminals has brought about an integration of computer and serial data communications. This integration has become a part of almost every discipline utilizing computer technology including private business, governmental agencies, universities, and even the private home.
To facilitate the exchange of information between two stations (computers and/or terminals) in a communications network a data link is used. As shown in FIG. 1, the link includes the communications channel, modems 1 and 2, and data terminal equipment (DTE) 3 and 4, the latter being the subject of the present invention. The present invention has been commercially available from Motorola, Inc. since July, 1977 in the form of the MC6854 known as the Advanced Data Link Controller (ADLC). The ADLC performs the serial-to-parallel and parallel-to-serial interface between the communications link and the computer or terminal.
There are two basic types of data link configurations: (1) point-to-point and (2) multipoint. As shown in FIGS. 2A, 2B, and 4, in a point-to-point link one or more secondary stations are each connected directly to a primary station. All information transfer occurs between a primary station and a secondary station. The transmission can be either half-duplex (two-way alternate) as shown in FIG. 2A, or full-dulpex (two-way simultaneous) as shown in FIG. 2B, and it can occur over a non-switched direct connection or through a central office switching network, as shown in FIG. 4.
Multipoint configurations take the form of a single primary station connected to many secondary stations in a parallel arrangement, as illustrated in FIG. 3. The primary station controls all data transfers over the link, and all communications are between the primary and a secondary. It is possible, however, for one station to both act as a primary in one link and as a secondary in another, as illustrated in FIG. 5. In such configuration the data link can be either half-duplex or full-duplex.
The loop configuration, illustrated in FIG. 6, is a special type of point-to-point configuration in which one or more secondaries are connected to the communications link in serial fashion. Each secondary station is a repeater of the up-loop data to the next down-loop secondary station. Loop operation requires the data link to operate in a half-duplex, one direction only mode. Signals sent out on the loop by the primary station are relayed from station to station. This type of configuration finds widespread application in multi-terminal systems (e.g. department store terminals, airline terminals, local insurance company facilities, etc.).
In an asynchronous data communications link serial data is transmitted in a nonclocked fashion. That is, the serial data link between two DTE's (FIG. 1) does not have an associated clock. It is the responsibility of the DTE to synchronize each incoming data character with its internal system. The DTE requires that each character received include a special code which allows it to establish this synchronization. In a typical transmission the communications line is kept in a known state (usually a mark idle consisting of a succession of binary 1's) when information is not being transmitted. Each character when transmitted is preceded by a start bit indicating to the serial interface circuit the beginning of a character and is followed by one or more stop bits signifying the end of the character. Once a character has been sent the data line returns to mark idle waiting for the next character. The start and stop bits of the asynchronous character are used to establish both character and bit synchronization for the receiver DTE.
The asynchronous character can vary in length from five to seven bits (eight bits if parity is used) depending on the type of code used. The distinctive characteristic of this form of transmission is that the data stream is not synchronized (i.e., is asynchronous) with a clock.
In a synchronous data communications link serial data is transmitted in a clocked fashion. That is, clock timing is included with the data stream that is sent to the serial interface circuit (DTE) to establish bit-by-bit synchronization. Since the data is already synchronized there is no need to include start and stop bits with each transmitted character as in asynchronous operation. The idle mode for a synchronous data link is determined by the individual system and can include either mark idling or the repetitive transmission of a special character. Information is typically sent in blocks or frames which can contain many characters. These blocks of information are normally preceded by one or more sync characters used to provide block or frame synchronization.
If a modem is used in a synchronous data link it usually is of the synchronous type. The transmitting side of the modem requires a clock synchronized with the data stream to be supplied to it from the DTE. The receiver side of the modem supplies the required synchronous clock along with the data stream to the DTE.
Asynchronous operation is normally used when the information transmission is irregular (e.g., from a teletype or terminal), whereas synchronous operation is used when the information flow is steady (e.g., between intelligent terminals or computers). The primary advantage of synchronous transmission is the increased efficiency of the communication channel through the elimination of start and stop bits for each character.
To allow communications in an orderly fashion between various computers and terminals in a data link, a uniform method of sending and receiving information is required. This uniformity is obtained from a well-defined protocol (set of rules) used for management of the data link in the communication system. Protocols are used to perform such functions as establishing and terminating the conversation between two stations, identifying the sender and receiver, acknowledging received information, and initializing stations. The exact procedure and function performed depends on the protocol used.
Protocols can be classified as Binary Synchronous Communications (Bisync) Protocols or Bit Oriented Protocols (BOP). Bisync was introduced by IBM in 1966. The Bit Oriented Protocols comprise the Synchronous Data Link Control (SLDC) protocol introduced by IBM in 1973, the High Level Data Link Control (HDLC) protocol proposed by IBM in 1971 for international data communications, and the Advanced Data Communications Control Procedure (ADCCP) introduced by the American National Standards Institute in 1973.
In Bisync information is transferred in the form of a block consisting of two or more sync characters, an address, control characters, an information field, and an error checking code. Special block control characters are used to effect orderly operation of the data link. A restriction on the information field is that a bit sequence that matches any of the block control characters cannot be allowed to occur, since this would be interpreted as a control character rather than as data. Transmission of information in Bisync is limited to half-duplex (two-way alternate). This results from the stop-and-wait procedure which characterizes Bisync. Once a communications channel is established and the transmitter sends one block it stops and waits for an acknowledgement (ACK) signal before sending another block. The receiver, having acquired the block, checks for errors and then sends an ACK control character to the transmitter indicating that the block is correct or a NACK control character to indicate an error.
In contrast to Bisync, which is character-oriented, BOP assigns specific meaning to the individual bits of each field of the data stream. All communications in a BOP system are in the form of frames of uniform format. The frame comprises a number of fields each having a definite location and precise meaning, as will be described below. There are only three characters (beginning/ending frame, abort, and go-active-on-poll) that control the data flow on the communications link. A zero-bit insertion technique ensures that these three charater codes never occur inside a frame, thus allowing complete code transparency. This considerably simplifies the code bookkeeping as compared with Bisync.
In addition, an implied acknowledgement technique used in BOP enables frame acknowledgement information to be included within a frame primarily transferring data to a station. This is accomplished by assigning identification numbers to received and transmitted frames called sequence numbers N(R) and N(S). These numbers contain information pertaining to the number of frames transmitted and received by the individual station. By checking these numbers the station can compare the number of received frames with the number of transmitted frames and take appropriate recovery action if a discrepancy exists. Thus it is not necessary to operate in a stop-and-wait mode and send frames containing acknowledgement information only (as in Bisync), and BOP accordingly operates in a full-duplex (two-way simultaneous) mode. The ability to operate in full-duplex mode is a major advantage of BOP over Bisync. BOP can also operate in half-duplex mode, although much of its inherent power is thereby lost.
Other advantageous features of BOP include the fact that BOP is not restricted to any one type of data link configuration. Transmission can occur point-to-point, multipoint, or in a loop, and it can use telephone lines (switched on non-switched), radio links, microwave links or any other system used for transmitting serial data. In addition, BOP is code independent. It is even possible for more than one code to be used on the same data link without sacrificing throughput or accuracy. This feature is useful in networks comprising products of different manufacturers.
As mentioned above, under BOP all transmissions--commands, control, and data--are transmitted in a format called a frame, depicted in FIG. 7. Each field has positional significance and when present must occur in the sequence indicated in the diagram.
The flag is the frame delimiter indicating the beginning and ending of a frame and has a unique binary pattern of 01111110. It provides frame synchronization and can also be used for time-fill purposes when the data link is not transmitting information. This pattern cannot be allowed to occur anywhere within the internal fields of a frame, since this would mistakenly be interpreted as a flag.
A frame is identifiable because it is bounded by flags and contains only non-flag bit patterns. This is not a restriction on frame content as BOP requires that whenever a continuous pattern of five 1's is detected within a frame a 0 is automatically inserted by the transmitter. Thus no interframe pattern of 01111110 (a flag) is ever transmitted. This is called the zero-bit insertion technique. The receiver, after detecting the opening flag, removes each 0 that follows a 011111 bit pattern, restoring the data to its original form. Zero-bit insertion gives the interframe data complete transparency.
The address field always contains the address of the secondary station. If the frame is a command (primary originated) the address identifies the secondary station being commanded. If the frame is a response (secondary answering) the address identifies to the primary which secondary is responding. Some systems can provide for special addresses such as a global address (all 1's) which can be used to address all secondary stations. In SDLC the address is a single eight-bit character allowing 256 different addresses. However, in ADCCP and HDLC this field can be extended to N octets (eight-bit bytes).
The control field is a multifunctional character that not only is responsible for the commands and responses required by the data link, but also performs much of the bookkeeping chores needed. It (1) defines the type of frame (information, supervisory, or non-sequenced), (2) keeps track of how many frames have been sent and received, and (3) issues commands and control information.
An information frame is distinguished by the first bit of the control field being equal to a binary 0. Supervisory frames are used to acknowledge the reception of error-free frames, to request retransmission of information frames, and to inhibit the sending of information frames. Non-sequenced frames are used for data link management. Data link management includes activating and initializing secondary stations, controlling the response mode of secondary stations, and reporting procedural errors (not recoverable by retransmission). SDLC protocol does not allow for control field extension, whereas both HDLC and ADCCP have control field extension modes.
The information field contains the data to be transferred over the data link. Supervisory frames do not contain information fields, and only selected nonsequenced frames contain information fields. Since it is code-independent the information field is unrestricted as to its content and the zero-bit insertion technique gives the field complete transparency to the data link control characters. SLDC does not restrict the information field length but requires that it be a multiple of eight bits. ADCCP and HDLC do not restrict the information field to multiples of eight bits but allow a completely unrestricted field length. The length of the information field is normally limited by the system (such as the size of the station I/O buffer).
In BOP all frames contain a sixteen-bit error-checking sequence which precedes the closing flag. These sixteen bits result from a mathematical computation on the binary value of all bits (excluding inserted 0's) within the frame (excluding the flag) and are used to validate transmission accuracy. The transmitter performs the computation on the address, control, and information (if present) fields, attaches the calculated sixteen-bit FCS field, and sends it out. The receiving station performs the same computation on the incoming data stream and checks its result with the FCS field sent by the transmitting station. If no error is found the frame is accepted. If an error is found the receiving station goes through its error recovery sequence which may include a retransmission of the frame.
In BOP an abort command is a system command in which a station sending a frame can end the transmission and be sure the receiving station ignores the frame. The transmitting station aborts by sending eight consecutive binary 1's (unintentional abort caused by 1's in the information field is prevented by zero insertion). The abort pattern not only closes the frame without an FCS field or an ending flag, but it also terminates the continuity of the data link. The primary station retains control. Either a primary station or secondary station may abort. The abort pattern may be followed by a pattern of seven (minimum) additional 1's (a total of at least fifteen contiguous 1's) which idles the data link, or it may be followed by a flag. An aborting secondary station may not start another frame until it receives a command to do so from the primary station.
In BOP the primary is solely responsible for the orderly flow of information on the data link. All data flow is initiated by the primary station, and all transmissions go to or from it. The primary station must check for responses to its command. Two basic timeouts are available to a primary station for this purpose: (1) idle detect and (2) non-productive receive.
When the primary station polls a secondary station, it expects a response within a certain period of time. The data link is normally in the idle state during this time (an exception occurs if a duplex secondary station is transmitting). If the idle state continues past the time allotted for a response, it is cause for recovery action by the primary.
The interval allowed before initiating recovery action includes propogation time between primary-secondary and secondary-primary, processing time at the secondary, and "clear-to-send" time at the secondary station.
The absence of a response does not necessarily result in idle detect; a received signal may be present but unintelligible. This situation is called "nonproductive receive". The timeout for nonproductive receive should be long enough to allow the transmitting secondary station the time it would normally use to pause and wait for confirmation. A period of from 3 to 20 seconds (or more) is the usual range. Continuation of nonproductive receive conditions beyond that time indicates a mishap at the secondary station that is not recoverable by retransmission.
Retries are unrequested transmissions; they result from timeouts. The counting of retry or retransmission attempts is not specified by SDLC procedures. Customarily, they are counted by the DTE, and at some planned number "n", the attempt is reported as non-recoverable at the data link level. If a transmission is not received accurately by a receiving station an error condition results. If this error occurs as a result of poor conditions on the data lines the data may be recoverable by retransmission. If the error occurs due to other reasons, retransmission may not help.
Operation in a loop configuration requires a set of protocol reules by which a secondary station can place itself on-loop (connect its transmitter output to the loop), go active on the loop (start transmitting its own data on the loop), and go off-loop (disconnect its transmitter output). This set of rules allows each secondary station to transmit its information to the primary station in an efficient, orderly manner without interference from other secondary stations.
Reference is made to IBM publication GA27-3093-1 entitled "IBM Synchronous Data Link Control-General Information", published in 1974 by IBM, for further information concerning Bit Oriented Protocols in general and SDLO in particular.